<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Dashboard">
    <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <title>码客思</title>
    <link href="${rc.contextPath}/assets/css/bootstrap.css" rel="stylesheet">
    <link href="${rc.contextPath}/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/assets/css/zabuto_calendar.css">
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/assets/js/gritter/css/jquery.gritter.css" />
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/assets/lineicons/style.css">    
    <link href="${rc.contextPath}/assets/css/style.css" rel="stylesheet">
    <link href="${rc.contextPath}/assets/css/style-responsive.css" rel="stylesheet">
    <script src="${rc.contextPath}/assets/js/chart-master/Chart.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
   	<div class="row mt">
   		<div class="col-lg-12">
           <div class="form-panel">
           	  <h4 class="mb">系统管理 <i class="fa fa-angle-right"></i> 个人信息修改</h4>
               <form id="beanform" class="form-horizontal style-form" action="#">
               	    <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">姓名</label>
                       <div class="col-sm-10">
                           <span class="help-block">${bean.name}</span>
                           <input type="hidden" name="id" id="id" value="${bean.id}"/>
                           <input type="hidden" name="code" id="code" value="${bean.code}"/>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">标识号码</label>
                       <div class="col-sm-10">
                           <span class="help-block">${bean.code}</span>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">手机号码</label>
                       <div class="col-sm-10">
                           <span class="help-block">${bean.tel}</span>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">邮箱</label>
                       <div class="col-sm-10">
                           <span class="help-block">${bean.email}</span>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">性别</label>
                       <div class="col-sm-10">
                          <select class="form-control" name="sex">
							  <option value="0" <#if bean.sex == 0>selected="selected"</#if>>男</option>
							  <option value="1" <#if bean.sex == 1>selected="selected"</#if>>女</option>
						</select>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">身份证号码</label>
                       <div class="col-sm-10">
                         <div class="controls">
                           <input type="text" name="infono" id="infono"  value="${bean.infono}" check-type="" required-message="不能为空!" class="form-control">
                         </div>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-sm-2 col-sm-2 control-label">联系地址</label>
                       <div class="col-sm-10">
                         <div class="controls">
                           <input type="text" name="address" id="address" value="${bean.address}"  check-type="" required-message="不能为空!" class="form-control">
                         </div>
                           <span class="help-block">你的常用联系地址</span>
                       </div>
                   </div>
                   <div class="form-group">
                       <label class="col-lg-2 col-sm-2 control-label"></label>
                       <div class="col-lg-10">
                           <button type="button" class="btn btn-theme" onclick="sub()">✔保存个人信息</button>
                       </div>
                   </div>
               </form>
           </div>
   		</div><!-- col-lg-12-->      	
   	</div><!-- /row -->
                 
    <script src="${rc.contextPath}/assets/js/jquery.js"></script>
    <script src="${rc.contextPath}/assets/js/jquery-1.8.3.min.js"></script>
    <!-- 验证框架 -->
	<script type="text/javascript" src="${rc.contextPath}/bootstrap/bootstrap.min.js"></script>
	<script type="text/javascript" src="${rc.contextPath}/bootstrap/bootstrap-modal.js"></script>
	<script type="text/javascript" src="${rc.contextPath}/bootstrap/bootstrap-modalmanager.js"></script>
	<script type="text/javascript" src="${rc.contextPath}/bootstrap/bootstrap-validation.js"></script>
    
    <script src="${rc.contextPath}/assets/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="${rc.contextPath}/assets/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="${rc.contextPath}/assets/js/jquery.scrollTo.min.js"></script>
    <script src="${rc.contextPath}/assets/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="${rc.contextPath}/assets/js/jquery.sparkline.js"></script>
    <script src="${rc.contextPath}/assets/js/common-scripts.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/assets/js/gritter/js/jquery.gritter.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/assets/js/gritter-conf.js"></script>
    <script src="${rc.contextPath}/assets/js/sparkline-chart.js"></script>    
	<script src="${rc.contextPath}/assets/js/zabuto_calendar.js"></script>	
		<!-- 弹出JS -->
	<script type="text/javascript" src="${rc.contextPath}/layer/layer.js"></script>
	<script type="text/javascript">
	function sub(){
		var flag =$("#beanform").validationAjax();
		if(flag){
			$.ajax({
	            cache: true,
	            type: "POST",
	            url:"${rc.contextPath}/sysuser/update",
	            data:$('#beanform').serialize(),// 你的formid
	            async: false,
	            error: function(request) {
	            	layer.msg("系统错误");
	            },
	            success: function(data) {
	            	if("success" == data){
	            		layer.msg("保存信息成功！");
	            	}else{
	            		layer.msg("系统错误！");
	            	}
	            	
	            }
	        });
		}else{
			return false;
		}
		return false;
		
	}
	</script>
  </body>
</html>
